<?php
/**
* SocialEngine
*
* @category   Application_Extensions
* @package    Flashgame
* @version    $Id: Package.php 6072 2010 YouNet $
* @author     To Anh
*/

class Flashgame_Form_Admin_Package_Edit extends Flashgame_Form_Admin_Package
{
    public $_error = array();
    protected $_item;

    public function getItem()
    {
        return $this->_item;
    }

    public function setItem(Core_Model_Item_Abstract $item)
    {
        $this->_item = $item; 
        return $this;
    }

    public function init()
    {
        parent::init();
        $this->setTitle('Edit Package')
        ->setDescription('Edit your package below, then click "Save Changes" to save your package.');
       
        $this->submit->setLabel('Save Changes');
        $this->package_name->setValue($this->_item->package_name);
        $this->package_description->setValue($this->_item->package_description);
        $this->package_enabled->setValue($this->_item->package_enabled);
        //$this->package_level_id->setValue($this->_item->package_level_id);
        //$this->package_downgrade_level_id->setValue($this->_item->package_downgrade_level_id);
        $this->package_period->setValue($this->_item->package_period);
        
        $this->package_periodtype->setValue($this->_item->package_periodtype);
        //$this->package_recurring->setValue($this->_item->package_recurring);
        //$this->package_recurring_cycles->setValue($this->_item->package_recurring_cycles);
        $this->package_price->setValue($this->_item->package_price);
        /*$this->package_onetime_price->setValue($this->_item->package_onetime_price);*/
    }
}